A logical interpretation of Java-style exceptions

نویسنده

  • Jeffrey A. Vaughan
چکیده

This paper presents a novel, type-based exception analysis for EC (an Exception Calculus)—a higher-order, typed programming language with first-class, Java-style exceptions. EC exceptions are predeclared and are subject to a nominal subtyping relation. Every exception has its own type, and generic exception handling is performed by handling a supertype of all applicable exceptions. Typing is based on result contexts, which are are analogous to the multiple-conclusion succedents in Gentzen’s LK. This paper proves the syntactic soundness of EC, and presents a shallow embedding of EC types and judgments in LK. The embedding gives rise to a pleasant interpretation of subtyping as logical consequence.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Proving Syntactic Properties of Exceptions in an Ordered Logical Framework

We formally prove the stackability and linearity of exception handlers with ML-style semantics using a novel proof technique via an ordered logical framework (OLF). We rst transform exceptions into continuation-passing-style (CPS) terms and formalize the exception properties as a judgement on the CPS terms. Then, rather than directly proving that the properties hold for terms, we prove our theo...

متن کامل

An uncaught exception analysis for Java q , qq

Current JDK Java compiler relies on programmer’s declarations (by throws clauses) for checking against uncaught exceptions of the input program. It is not elaborate enough to remove programmer’s unnecessary handlers nor suggest to programmers for specialized handlings (when programmer’s declarations are too broad). We propose a static analysis of Java programs that estimates their uncaught exce...

متن کامل

A Comparison of the Mutual Exclusion Features in Ada and the Real-Time Specification for Java TM

A concurrent program generally comprises a collection of threads1 that interact cooperatively, either directly or through shared data objects. In the latter case the sharing needs to be implemented by some mechanism that ensures mutually exclusive access, or possibly “concurrent read / exclusive write”. Ada and the Real-Time Specification for Java have taken different approaches to mutual exclu...

متن کامل

Proving Exception Stackability and Linearity in an Ordered Logical Framework

We formally prove the stackability and linearity of exception handlers of ML-style semantics using a novel proof technique via an ordered logical framework (OLF). We first transform exceptions into continuation-passing-style (CPS) terms and formalize the exception properties as a judgement on the CPS terms. Then, rather than directly proving that the properties hold for terms, we prove our theo...

متن کامل

Superinstructions and Replication in the Cacao JVM interpreter

Dynamic superinstructions and replication can provide large speedups over plain interpretation. In a JVM implementation we have to overcome two problems to realize the full potential of these optimizations: the conflict between superinstructions and the quickening optimization; and the non-relocatability of JVM instructions that can throw exceptions. In this paper, we present solutions for thes...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008